<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>OpenLayers v8.2.0 API - Class: WebGLPointsLayerRenderer</title>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
        crossorigin="anonymous"></script>
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css"
        crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="styles/prettify-tomorrow.css">
    <link rel="stylesheet" type="text/css" href="styles/jaguar.css">
    <link rel="stylesheet" type="text/css" href="styles/carbon.css">
    <link rel="stylesheet" type="text/css" href="/theme/ol.css">
    <link rel="stylesheet" type="text/css" href="/theme/site.css">
</head>

<body>
    <header class="navbar navbar-expand-sm navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70"
                alt="">&nbsp;OpenLayers</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu"
            aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
            <ul class="nav navbar-nav ms-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="docdropdown">
                        <a class="dropdown-item" href="/doc/">Docs</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/doc/quickstart.html"><i
                                class="fa fa-check fa-fw me-2 fa-lg"></i>快速入门</a>
                        <a class="dropdown-item" href="/doc/faq.html"><i
                                class="fa fa-question fa-fw me-2 fa-lg"></i>FAQ</a>
                        <a class="dropdown-item" href="/doc/tutorials/"><i
                                class="fa fa-book fa-fw me-2 fa-lg"></i>Tutorials</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i
                                class="fab fa-stack-overflow fa-fw me-2"></i>Ask a Question</a>
                    </div>
                </li>
                <li class="nav-item"><a class="nav-link" href="/en/latest/examples/">Examples</a></li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="apidropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-sitemap me-1"></i>API
                    </a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="apidropdown">
                        <a class="dropdown-item" href="/en/latest/apidoc/"><i
                                class="fa fa-sitemap fa-fw me-2 fa-lg"></i>v8.2.0
                            (latest)</a </div>
                </li>
            </ul>
        </nav>
    </header>

    <div class="container-fluid">
        <div id="wrap" class="row">
            <div class="navigation col-md-4 col-lg-3">
                <div class="search-wrapper">
                    <div class="search">
                        <input id="search" type="text" autocomplete="off" class="form-control input-sm"
                            placeholder="Search Documentation">
                    </div>
                </div>
                <div class="navigation-list-wrapper">
                    <ul class="navigation-list search-empty">
                        <li class="item item-class toggle-manual toggle-manual-show"
                            data-longname="module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer"
                            data-name="ol/renderer/webgl/pointslayer">
                            <span class="title toggle">
                                <span class="fa fa-chevron-right me-2 mt-1"></span>
                                <span><a
                                        href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html">ol​/renderer​/webgl​/PointsLayer</a></span>
                            </span>
                            <div class="member-list" data-type="methods">
                                <span class="subtitle">Methods</span>
                                <ul>
                                    <li data-name="changed"><a
                                            href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html#changed">changed</a>
                                    <li data-name="dispatchevent"><a
                                            href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html#dispatchEvent">dispatchEvent</a>
                                    <li data-name="getrevision"><a
                                            href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html#getRevision">getRevision</a>
                                    <li data-name="on"><a
                                            href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html#on">on</a>
                                    <li data-name="once"><a
                                            href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html#once">once</a>
                                    <li data-name="un"><a
                                            href="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html#un">un</a>
                                </ul>
                            </div>
                            <div class="member-list" data-type="fires">
                                <span class="subtitle">Fires</span>
                                <ul>
                                    <li data-name="change"><a
                                            href="module-ol_events_Event-BaseEvent.html#event:change">change</a>
                                    <li data-name="error"><a
                                            href="module-ol_events_Event-BaseEvent.html#event:error">error</a>
                                </ul>
                            </div>
                        <li class="loading">Loading …
                    </ul>
                </div>
            </div>

            <div class="main col-md-8 col-lg-9">
                <h1 class="page-title"
                    data-filename="module-ol_renderer_webgl_PointsLayer-WebGLPointsLayerRenderer.html">Class:
                    WebGLPointsLayerRenderer</h1>
                <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
                    <button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert"
                        aria-label="Close"></button>
                    This documentation is for OpenLayers v<span id="package-version">8.2.0</span>. The <a
                        id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
                </div>




                <section class="content">

                    <header>
                        <h2 class="my-3">
                            <span class="ancestors"><a
                                    href="module-ol_renderer_webgl_PointsLayer.html">ol/renderer/webgl/PointsLayer</a>~</span>WebGLPointsLayerRenderer
                        </h2>
                        <br>



                        <pre
                            class="prettyprint source"><code>import WebGLPointsLayerRenderer from '<a href="module-ol_renderer_webgl_PointsLayer.html">ol/renderer/webgl/PointsLayer</a>.js';</code></pre>


                        <div class="row p-3 ">
                            <!-- <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
                                <script async type="text/javascript"
                                    src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg"
                                    id="_carbonads_js"></script>
                            </div> -->

                            <div class="class-description col-lg-7 align-self-center ps-0">
                                <p>针对点的优化WebGL向量渲染器。所有特征都将被渲染为四边形（由两个三角形形成的正方形）。每当向量源发生变化时，新数据都会被刷新到GPU。</p>
                                <p>你需要提供用于渲染的顶点着色器和片段着色器。这可以使用
                                    <code>ShaderBuilder</code>实用程序来完成。这些着色器应期望一个<code>a_position</code>属性，该属性包含四边形在屏幕空间中的投影中心，
                                    以及一个
                                    <code>a_index</code> 属性，其值（0、1、2或3） 指示当前正在处理哪个四边形的顶点（见下文结构）。
                                </p>
                                <p>要在着色器中包含可变属性，你需要使用options对象的
                                    <code>attributes</code> 属性来声明它们，如下所示：
                                </p>
                                <pre class="prettyprint source lang-js"><code>new WebGLPointsLayerRenderer(layer, {
  attributes: [
    {
      name: 'size',
      callback: function(feature) {
        // compute something with the feature
      }
    },
    {
      name: 'weight',
      callback: function(feature) {
        // compute something with the feature
      }
    },
  ],
  vertexShader:
    // shader using attribute a_weight and a_size
  fragmentShader:
    // shader using varying v_weight and v_size</code></pre>
                                <p>为了启用命中检测，你还必须使用
                                    <code>hitVertexShader</code>
                                    and <code>hitFragmentShader</code>属性提供专门的着色器。这些着色器应期望
                                    <code>a_hitColor</code>属性包含最终颜色，该颜色必须输出才能使命中检测生效。
                                </p>
                                <p>以下uniform用于主纹理： <code>u_texture</code>.
                                    以下uniform用于图层不透明度： <code>u_opacity</code>.</p>
                                <p>请注意，主着色器输出应具有预乘 alpha,，否则可能会出现视觉异常。</p>
                                <p>点被渲染为具有以下结构的四边形：</p>
                                <pre class="prettyprint source"><code>  (u0, v1)      (u1, v1)
 [3]----------[2]
  |`           |
  |  `         |
  |    `       |
  |      `     |
  |        `   |
  |          ` |
 [0]----------[1]
  (u0, v0)      (u1, v0)</code></pre>
                                <p>This uses <code>WebGLHelper</code> internally.</p>
                            </div>

                        </div>
                    </header>

                    <article>
                        <div class="container-overview">



                            <dl>

                                <dt class="">

                                    <div class="nameContainer">
                                        <div class="anchor" id="WebGLPointsLayerRenderer">
                                        </div>
                                        <h4 class="name">
                                            new WebGLPointsLayerRenderer<span class="signature">(layer, options)</span>



                                        </h4>

                                        <div class="tag-source">
                                            <a
                                                href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/renderer/webgl/PointsLayer.js">renderer/webgl/PointsLayer.js</a>,
                                            <a
                                                href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/renderer/webgl/PointsLayer.js#L124">line
                                                124</a>
                                        </div>

                                    </div>


                                </dt>
                                <dd class="">













                                    <table class="params">
                                        <thead>
                                            <tr>

                                                <th>Name</th>


                                                <th>Type</th>

                                                <th class="last">Description</th>
                                            </tr>
                                        </thead>

                                        <tbody>


                                            <tr class="">

                                                <td class="name"><code>layer</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_layer_Layer-Layer.html">Layer</a></span>




                                                </td>



                                                <td class="description last">

                                                    <p>Layer.</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>options</code></td>




                                                <td colspan=2 class="description last">

                                                    <p>Options.</p>


                                                    <table class="params">
                                                        <thead>
                                                            <tr>

                                                                <th>Name</th>


                                                                <th>Type</th>

                                                                <th class="last">Description</th>
                                                            </tr>
                                                        </thead>

                                                        <tbody>


                                                            <tr class="">

                                                                <td class="name"><code>className</code></td>



                                                                <td class="type">


                                                                    <span class="param-type">string</span>



                                                                    (defaults to 'ol-layer')


                                                                </td>



                                                                <td class="description last">

                                                                    <p>要设置为canvas元素的CSS类名。
                                                                    </p>
                                                                </td>
                                                            </tr>



                                                            <tr class="">

                                                                <td class="name"><code>attributes</code></td>



                                                                <td class="type">


                                                                    <span class="param-type">Array&lt;<a
                                                                            href="module-ol_renderer_webgl_PointsLayer.html#~CustomAttribute">CustomAttribute</a>></span>

                                                                    | undefined


                                                                </td>



                                                                <td class="description last">

                                                                    <p>这些属性将从源中的特征中读取，然后传递给GPU。每个属性的<code>name</code>
                                                                        属性将作为其标识符：</p>
                                                                    <ul>
                                                                        <li>在顶点着色器中，通过在其前加上<code>a_</code>来作为
                                                                            <code>属性(attribute)</code>。
                                                                        </li>
                                                                        <li>在片段着色器中，通过在其前加上<code>v_</code>来作为
                                                                            <code>变量(varying)</code> 。请注意，这些只能是数值。
                                                                        </li>
                                                                    </ul>
                                                                </td>
                                                            </tr>



                                                            <tr class="">

                                                                <td class="name"><code>vertexShader</code></td>



                                                                <td class="type">


                                                                    <span class="param-type">string</span>




                                                                </td>



                                                                <td class="description last">

                                                                    <p>顶点着色器源代码，必填。</p>
                                                                </td>
                                                            </tr>



                                                            <tr class="">

                                                                <td class="name"><code>fragmentShader</code></td>



                                                                <td class="type">


                                                                    <span class="param-type">string</span>




                                                                </td>



                                                                <td class="description last">

                                                                    <p>片段着色器源代码，必填。</p>
                                                                </td>
                                                            </tr>



                                                            <tr class="">

                                                                <td class="name"><code>hitDetectionEnabled</code></td>



                                                                <td class="type">


                                                                    <span class="param-type">boolean</span>

                                                                    | undefined


                                                                </td>



                                                                <td class="description last">

                                                                    <p>着色器是否支持命中检测。</p>
                                                                </td>
                                                            </tr>



                                                            <tr class="">

                                                                <td class="name"><code>uniforms</code></td>



                                                                <td class="type">


                                                                    <span
                                                                        class="param-type">Object&lt;UniformValue></span>

                                                                    | undefined


                                                                </td>



                                                                <td class="description last">

                                                                    <p>后处理步骤的uniform定义。请注意，<code>u_texture</code>保留给主纹理槽，
                                                                        <code>u_opacity</code>保留给图层不透明度。
                                                                    </p>
                                                                </td>
                                                            </tr>



                                                            <tr class="">

                                                                <td class="name"><code>postProcesses</code></td>



                                                                <td class="type">


                                                                    <span class="param-type">Array&lt;<a
                                                                            href="module-ol_renderer_webgl_Layer.html#~PostProcessesOptions">PostProcessesOptions</a>></span>

                                                                    | undefined


                                                                </td>



                                                                <td class="description last">

                                                                    <p>后处理定义</p>
                                                                </td>
                                                            </tr>


                                                        </tbody>
                                                    </table>
                                                </td>
                                            </tr>


                                        </tbody>
                                    </table>




                                    <dl class="details">





















                                    </dl>



                                    <h5>Fires:</h5>
                                    <ul>
                                        <li class="">
                                            <code><a href="module-ol_events_Event-BaseEvent.html#event:change">change</a></code>
                                            (<a href="module-ol_events_Event-BaseEvent.html">BaseEvent</a>)
                                            -通用更改事件。在修订计数器增加时触发。
                                        </li>

                                        <li class="">
                                            <code><a href="module-ol_events_Event-BaseEvent.html#event:error">error</a></code>
                                            (<a
                                                href="module-ol_events_Event-BaseEvent.html">BaseEvent</a>)-通用错误事件。在发生错误时触发。
                                        </li>
                                    </ul>











                                </dd>

                            </dl>

                        </div>




                        <h3 class="subsection-title">Extends</h3>

                        <ul>
                            <li><a href="module-ol_renderer_webgl_Layer-WebGLLayerRenderer.html">WebGLLayerRenderer</a>
                            </li>
                        </ul>















                        <h3 class="subsection-title">Methods</h3>

                        <dl>


                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="changed">
                                    </div>
                                    <h4 class="name">
                                        changed<span class="signature">()</span>

                                        <span class="inherited"><a
                                                href="module-ol_Observable-Observable.html#changed">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js">Observable.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js#L68">line
                                            68</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">
                                <div class="description">
                                    <p>增加修订计数器并派发一个 'change' 事件。</p>
                                </div>











                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="dispatchEvent">
                                    </div>
                                    <h4 class="name">
                                        dispatchEvent<span class="signature">(event)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{boolean | undefined}</span>

                                        <span class="inherited"><a
                                                href="module-ol_events_Target-Target.html#dispatchEvent">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/events/Target.js">events/Target.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/events/Target.js#L85">line
                                            85</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">
                                <div class="description">
                                    <p>派发一个事件并调用所有监听此类型事件的监听器。事件参数可以是字符串或具有 <code>type</code>属性的对象。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>event</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_events_Event-BaseEvent.html">BaseEvent</a></span>
                                                |

                                                <span class="param-type">string</span>




                                            </td>



                                            <td class="description last">

                                                <p>Event object.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                如果任何人在事件对象上调用 preventDefault，或者如果任何监听器返回 false，则为<code>false</code>。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getRevision">
                                    </div>
                                    <h4 class="name">
                                        getRevision<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number}</span>

                                        <span class="inherited"><a
                                                href="module-ol_Observable-Observable.html#getRevision">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js">Observable.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js#L79">line
                                            79</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>获取此对象的版本号。每次对象被修改时，其版本号将递增。</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Revision.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="on">
                                    </div>
                                    <h4 class="name">
                                        on<span class="signature">(type, listener)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_events.html#~EventsKey">EventsKey</a> | Array&lt;<a
                                                href="module-ol_events.html#~EventsKey">EventsKey</a>>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_Observable-Observable.html#on">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js">Observable.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js#L152">line
                                            152</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>监听特定类型的事件。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>type</code></td>



                                            <td class="type">


                                                <span class="param-type">string</span>
                                                |

                                                <span class="param-type">Array.&lt;string></span>




                                            </td>



                                            <td class="description last">
                                                <p>事件类型或事件类型的数组。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>listener</code></td>



                                            <td class="type">


                                                <span class="param-type">function</span>




                                            </td>



                                            <td class="description last">
                                                <p>侦听器函数。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                监听器的唯一键。如果将事件类型的数组作为第一个参数调用，返回将是键的数组。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="once">
                                    </div>
                                    <h4 class="name">
                                        once<span class="signature">(type, listener)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_events.html#~EventsKey">EventsKey</a> | Array&lt;<a
                                                href="module-ol_events.html#~EventsKey">EventsKey</a>>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_Observable-Observable.html#once">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js">Observable.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js#L164">line
                                            164</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>仅监听特定类型的事件一次。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>type</code></td>



                                            <td class="type">


                                                <span class="param-type">string</span>
                                                |

                                                <span class="param-type">Array.&lt;string></span>




                                            </td>



                                            <td class="description last">
                                                <p>事件类型或事件类型的数组。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>listener</code></td>



                                            <td class="type">


                                                <span class="param-type">function</span>




                                            </td>



                                            <td class="description last">
                                                <p>侦听器函数。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                监听器的唯一键。如果将事件类型的数组作为第一个参数调用，返回将是键的数组。
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="un">
                                    </div>
                                    <h4 class="name">
                                        un<span class="signature">(type, listener)</span>

                                        <span class="inherited"><a
                                                href="module-ol_Observable-Observable.html#un">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js">Observable.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/Observable.js#L173">line
                                            173</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>取消监听特定类型的事件。</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>type</code></td>



                                            <td class="type">


                                                <span class="param-type">string</span>
                                                |

                                                <span class="param-type">Array.&lt;string></span>




                                            </td>



                                            <td class="description last">
                                                <p>事件类型或事件类型的数组。</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>listener</code></td>



                                            <td class="type">


                                                <span class="param-type">function</span>




                                            </td>



                                            <td class="description last">
                                                <p>侦听器函数。</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>

                        </dl>





                    </article>

                </section>




            </div>
        </div>
    </div>
    <script>prettyPrint();</script>
    <script src="scripts/linenumber.js"></script>
    <script src="scripts/main.js"></script>
</body>

</html>